package com.heima.mapper;
import com.github.pagehelper.Page;
import com.heima.pojo.dto.NodePageDTO;
import com.heima.pojo.entity.Node;
import com.heima.pojo.vo.NodeBsbusinessTypeVO;
import com.heima.result.PageResult;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface NodeMapper {
   Page<NodeBsbusinessTypeVO> pageNode(NodePageDTO dto);
   int add(Node node);

   @Select("select  * from tb_node where region_id=#{id}")
   List<Node> select(Long id);//取regionId 跟nodeid关联的所有数据

    int update(Node node);
    @Delete("delete from tb_node where id=#{id}")
    int delete(long id);
    @Select("select  * from tb_node where id=#{id}")
    NodeBsbusinessTypeVO selectVm(Long id);

    @Select("select * from tb_node where id=#{nodeId}")
    Node selectByNid(Long nodeId);
}
